<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.zzyx.bean.Yuyue"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML 
xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="<%=basePath %>admin/test/css/paiban01.css">
<META content="MSHTML 6.00.5730.13" name=GENERATOR>
<script type="text/javascript" src="<%=basePath %>/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
function initPaiBan()
{
  var value=$("#zhuanjia").find("option:selected").text()
  window.location.href="<%=basePath%>zhuanjiaPaibanchuzhenAction?zhuanjia="+value;
}
</script>
<!-- ajax异步加载二级联动菜单 -->
 <script type="text/javascript">
  //创建连接，判断浏览器 
    var http_request=false; 
    function createXMLHttpRequest()
    { 
	    if(window.XMLHttpRequest)
	    { 
	      XMLHttpReq=new XMLHttpRequest(); //创建对象对应不同的浏览器
	    } 
	    else if(window.ActiveXObject)
	    { 
		      try
		      { 
		         XMLHttpReq=new ActiveXObject("Msxml2.XMLHTTP"); 
		      }
		      catch(e)
		      { 
		
			      try
			      { 
			         XMLHttpReq=new ActiveXObject("Microsoft.XMLHTTP"); 
			      }
			      catch(e)
			      { 
			
			      } 
	
	        } 
	    } 

    } 

//onchange事件 
    function changeKeshi(){//当第一个下拉框的选项发生改变时调用该函数
    //var province=document.getElementById("provice").value; //获取第一级菜单的值
    var keshi=$('#keshi').val();
  
    sendRequest("<%=basePath%>ajaxZongheTongji02zhuanjiaAction?keshi="+keshi); //发送参数到SERVLET
//值得注意的是URL的servlet地址前面不加“/”并且为小写字母（试验的结论）
    } 
    //发送请求 
    function sendRequest(url){ //发送函数
    createXMLHttpRequest(); 
    XMLHttpReq.open("GET",url,true); 
    XMLHttpReq.onreadystatechange=progessRequest;//调用相关的XML接受函数 
    XMLHttpReq.send(null); 
    } 

//判断接收请求 
    function progessRequest(){ 
    if(XMLHttpReq.readyState==4){ 
    if(XMLHttpReq.status==200){ 
         var xmlDoc=XMLHttpReq.responseXML; //获取返回的XML文档
         var citys=xmlDoc.getElementsByTagName("zhuanjia");//获取XML节点
         var obj=document.getElementById("zhuanjia");//获取第二级菜单的对象
    if(obj!=null)
    {//如果不为空就置空 
           obj.options.length=0; 
         } 

      for(var i=0;i<citys.length;i++){//用循环给select中加值 

         var xValue = citys[i].childNodes[0].firstChild.nodeValue;

         var xText = citys[i].childNodes[1].firstChild.nodeValue;

         var option = new Option(xText, xValue);

      try{

         obj.add(option);

      }catch(e){}

      } 

    }else{ 

    alert( "请求异常"+XMLHttpReq.responseText); 

    } 

    } 
   } 
  </script>


</HEAD>
<BODY>
<div>

     &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;
 <select onChange="changeKeshi()" id="keshi" name="keshi" style="width:150px;background-color: #FFE8FA">
    	   <option>选择科室</option>
    	   <c:forEach items="${kess}" var="kall">
    	   <option value="${kall.name }">${kall.name }</option>
    	   </c:forEach>
    	   </select>
    	<br/> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;
  <select onchange="initPaiBan()" id="zhuanjia" name="zhuanjia" style="width:150px;background-color: #E2FFD7">
    	   <option>选择专家</option>
  </select>
</div>

   <!-- ----------------------------------------------------- -->
   <TABLE cellSpacing=1 cellPadding=4 width=1002 align=center bgColor=#2f8afc 
border=0>
  <TBODY>

  

  
  <TR align=middle bgColor=#82b8f6>
    <TD style="FONT-SIZE: 14px; COLOR: white" colSpan=8>本周排班表</TD></TR>
  <TR align=middle bgColor=#82b8f6>
    <TD>日期</TD>
    <c:forEach begin="0" end="5" var="ri"  varStatus="r">
    <TD style="TEXT-ALIGN: center"><c:forEach items="${xq}" begin="${r.count-1}" end="${r.count-1}" var="xq">${xq}</c:forEach>(${ri })</TD>
    </c:forEach>
   </TR>
  <TR>
    <TD bgColor=#82b8f6>上午</TD>
    <c:forEach begin="0" end="5">
    <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
      
       暂无
     </CENTER></TD>
      </c:forEach>
   </TR>
  <TR>
    <TD bgColor=#82b8f6>下午</TD>
     <c:forEach begin="0" end="5">
    <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
     
               暂无
      </CENTER>
      </c:forEach>
 </TR>
 <!-- 限号 -->
  <tr>
  <TD bgColor=#82b8f6>限号</TD>
 <c:forEach begin="0" end="5">
 <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
                  0个
      </CENTER></TD>
 </c:forEach>
 </tr>
 <!-- 挂号费 -->
 <tr>
  <TD bgColor=#82b8f6>挂号费</TD>
 <c:forEach begin="0" end="5">
 <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
      元
      </CENTER></TD>
 </c:forEach>
 </tr>
  <!-- 行车路线 --><tr>
 <TD bgColor=#82b8f6>行车路线</TD>
<c:forEach begin="0" end="5">
<TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff></TD>
</c:forEach>
 </tr>
 </TBODY>
      
      </TABLE><BR>
<TABLE cellSpacing=1 cellPadding=4 width=1002 align=center bgColor=#2f8afc 
border=0>
  <TBODY>
  <TR align=middle bgColor=#82b8f6>
    <TD style="FONT-SIZE: 14px; COLOR: white" colSpan=8>下周排班表</TD></TR>
  <TR align=middle bgColor=#82b8f6>
    <TD>日期</TD>
   
      <c:forEach  var="ri" begin="0" end="5" varStatus="r">
    <TD style="TEXT-ALIGN: center"><c:forEach items="${xzxq}" begin="${r.count-1}" end="${r.count-1}" var="xq">${xq}</c:forEach>(${ri })</TD>
    </c:forEach>
   </TR>
  <TR>
    <TD bgColor=#82b8f6>上午</TD>
    <c:forEach begin="0" end="5">
    <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
      
        暂无
     </CENTER></TD>
      </c:forEach>
   </TR>
  <TR>
    <TD bgColor=#82b8f6>下午</TD>
     <c:forEach begin="0" end="5">
    <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
      
       暂无
      </CENTER>
     
      </c:forEach></TR>
      <!-- 限号 -->
  <tr>
  <TD bgColor=#82b8f6>限号</TD>
 <c:forEach begin="0" end="5">
 <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
   个
      </CENTER></TD>
 </c:forEach>
 </tr>
 <!-- 挂号费 -->
 <tr>
  <TD bgColor=#82b8f6>挂号费</TD>
 <c:forEach begin="0" end="5">
 <TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff>
      <CENTER>
  元
      </CENTER></TD>
 </c:forEach>
 </tr>
 <!-- 行车路线 --><tr>
 <TD bgColor=#82b8f6>行车路线</TD>
<c:forEach begin="0" end="5">
<TD style="PADDING-LEFT: 10px; LINE-HEIGHT: 150%" vAlign=top 
bgColor=#ffffff></TD>
</c:forEach>
 </tr>
      </TBODY>
   
   </TABLE><!--模板2-->
   



</BODY></HTML>
